package com.hdaccp.shuiguoD.service.impl;

import com.hdaccp.shuiguoD.dao.userDao;
import com.hdaccp.shuiguoD.entity.User;
import com.hdaccp.shuiguoD.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private userDao userDao;

    @Override
    public List<User> getAll() {
        return userDao.queryAll();
    }

    @Override
    public long findTotalCount(String uname) {
        return userDao.getTotalCount(uname);
    }

    @Override
    public List<User> findAll(String uname,int offset,int limit) {
        return userDao.query(uname,offset,limit);
    }
}
